import LogLevel from 'main/util/Log/log-level';

class MLog {
  public static e(...params: any[]) {
    console.log(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.e, params);
  }

  public static w(...params: any[]) {
    console.warn(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.w, params);
  }

  public static i(...params: any[]) {
    console.info(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.i, params);
  }

  public static v(...params: any[]) {
    console.info(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.v, params);
  }

  public static d(...params: any[]) {
    console.debug(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.d, params);
  }

  public static s(...params: any[]) {
    console.info(params);
    window.electronAPI.ipcRenderer.mainLog(LogLevel.s, params);
  }
}
export default MLog;
